Skip to content

Conversation

@mateenmohsin
Copy link

No description provided.

@ggruber4711
Copy link
Owner

Worked fine testing it against my local temp directory. However when trying to run it against a bigger folder tree, which contains directories, where the current user does not have access to, it fails.

C:\Users\ggruber.WORKFLOW\Documents\GitHub\coding-challenges-mateen\folder-analyzer>node analyser.js c:\users\ggruber.workflow
fs.js:961
binding.lstat(pathModule.toNamespacedPath(path));
^

Error: EPERM: operation not permitted, lstat 'c:\users\ggruber.workflow\AppData\Local\ElevatedDiagnostics'
at Object.fs.lstatSync (fs.js:961:11)
at files.forEach (C:\Users\ggruber.WORKFLOW\Documents\GitHub\coding-challenges-mateen\folder-analyzer\analyser.js:112:25)
at Array.forEach ()
at analyzingDir (C:\Users\ggruber.WORKFLOW\Documents\GitHub\coding-challenges-mateen\folder-analyzer\analyser.js:110:11)
at files.forEach (C:\Users\ggruber.WORKFLOW\Documents\GitHub\coding-challenges-mateen\folder-analyzer\analyser.js:119:13)
at Array.forEach ()
at analyzingDir (C:\Users\ggruber.WORKFLOW\Documents\GitHub\coding-challenges-mateen\folder-analyzer\analyser.js:110:11)
at files.forEach (C:\Users\ggruber.WORKFLOW\Documents\GitHub\coding-challenges-mateen\folder-analyzer\analyser.js:119:13)
at Array.forEach ()
at analyzingDir (C:\Users\ggruber.WORKFLOW\Documents\GitHub\coding-challenges-mateen\folder-analyzer\analyser.js:110:11)

Is it possible to fix, that?

@mateenmohsin
Copy link
Author

This was due to user's permission to directory structure, I have fixed this issue in latest commit "mateenmohsin@9435b12"

@ggruber4711
Copy link
Owner

ggruber4711 commented Jun 6, 2018

Could you improve your fix, that the directory, which is not accessible is just skipped and the process of analyzing will just continue with the rest of the directory tree?
Goal should be to get a result for those parts of the folder hiearchy, which are accessible.

@mateenmohsin
Copy link
Author

Improved the fix in latest commit : 9ce436d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants